﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SetProductLayout.aspx.cs" Inherits="ZX.WebApp.Crm.SetProductLayout" %>
<%@ Register Assembly="ZX.Web.UI.Controls" Namespace="ZX.Web.UI.Controls" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../scripts/yui_2.9.0/build/reset-fonts-grids/reset-fonts-grids.css" />
    <link rel="stylesheet" type="text/css" href="../scripts/yui_2.9.0/build/container/assets/skins/sam/container.css" />
    <link rel="stylesheet" type="text/css" href="../scripts/yui_2.9.0/build/menu/assets/skins/sam/menu.css" />
    <link rel="stylesheet" type="text/css" href="../scripts/yui_2.9.0/build/button/assets/skins/sam/button.css" />
    <link rel="stylesheet" type="text/css" href="../scripts/yui_2.9.0/build/resize/assets/skins/sam/resize.css" />
    <link rel="stylesheet" type="text/css" href="../scripts/yui_2.9.0/build/layout/assets/skins/sam/layout.css" />
    <link rel="stylesheet" type="text/css" href="../Scripts/yui_2.9.0/build/datatable/assets/skins/sam/datatable.css" />
    <link rel="stylesheet" type="text/css" href="../Scripts/yui_2.9.0/build/paginator/assets/skins/sam/paginator.css" />
    <link rel="stylesheet" type="text/css" href="../scripts/yui_2.9.0/build/treeview/assets/skins/sam/treeview.css" />
    <style type="text/css">
    .yui-skin-sam table {
	    width: 100%;
    }
    </style>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/element/element-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/datasource/datasource-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/json/json-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/connection/connection-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/get/get-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/dragdrop/dragdrop.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/calendar/calendar-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/datatable/datatable-min.js"></script>
    <script type="text/javascript" src="../scripts/yui_2.9.0/build/layout/layout-min.js"></script>
    <script type="text/javascript" src="../scripts/yui_2.9.0/build/button/button-min.js"></script>
    <script type="text/javascript" src="../scripts/yui_2.9.0/build/container/container-min.js"></script>
    <script type="text/javascript" src="../scripts/yui_2.9.0/build/treeview/treeview-min.js"></script>
    <script type="text/javascript" src="../scripts/yui_2.9.0/build/resize/resize-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/paginator/paginator-min.js"></script>
    <script type="text/javascript" src="../scripts/yui_2.9.0/build/event-delegate/event-delegate-min.js"></script>
    <script type="text/javascript" src="../Scripts/jquery-1.4.1.min.js"></script>
</head>
<body class="yui-skin-sam">
    <form id="form1" runat="server">
    <div>
        <div id="listpage">
            <cc1:SelfDefineTree ID="TreeView1" runat="server" AllowCheck="true" TreeType="productlayout"></cc1:SelfDefineTree>
        </div>
    </div>
    </form>
</body>
<script type="text/javascript">
    (function () {
        var Dom = YAHOO.util.Dom,
        Event = YAHOO.util.Event;

        Event.onDOMReady(function () {
            var layout = new YAHOO.widget.Layout({
                units: [
                    { position: 'center', body: 'TreeView1', gutter: '1 2 1 1', header: '列表', scroll: true}]
            });
            layout.render();
        });
        var makeBranch = function (parent, label) {
        }
        tree2 = new YAHOO.widget.TreeView("TreeView1");
        makeBranch(tree2.getRoot());
        tree2.setNodesProperty('propagateHighlightUp', true);
        tree2.setNodesProperty('propagateHighlightDown', true);
        tree2.subscribe('clickEvent', tree2.onEventToggleHighlight);
        tree2.render();
        /*var request = "";
        YAHOO.util.Connect.asyncRequest('POST', request, {
            success: function (res) {
                var inventory;
                try {
                    var roleIDs = [];
                    var str = res.responseText;
                    var items = eval("[" + str + "]");
                    for (var i = 0; i < items[0].rows.length; i++) {
                        roleIDs.push(items[0].rows[i].FunctionID);
                    }
                    var childNodes = tree2.getNodeCount();
                    var topNodes = tree2.getNodesByProperty("href");
                    for (var i = 0; i < childNodes; ++i) {
                        var id = topNodes[i].href.split("#@")[1];
                        if (roleIDs.join(",").indexOf(id) > -1) {
                            topNodes[i].highlightState = 1;
                        }
                    }
                    tree2.render();
                }
                catch (e) {
                }
                finally {
                }
            },
            failure: function (error) {
                alert("读取菜单数据错误：" + error.statusText);
            }
        }, null);*/
    })();
    //改变节点处理函数
    function Native(caption, key) {
        fkey = key;
    }
</script>
</html>
